-- GENERATED SPELL FOR [Scarlet Mage] --


function spell0_1826(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1826', 3000, 1)
end

function spell1_1826(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_1826', 8348, 1)
end

function spell2_1826(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1826', 7000, 1)
end

function Sorts_1826(pUnit, Event)
local choix_sorts_1826 = math.random(0, 2)
if choix_sorts_1826 == 0 then
pUnit:RegisterEvent('spell0_1826', 1, 1)
end
if choix_sorts_1826 == 1 then
pUnit:RegisterEvent('spell1_1826', 1, 1)
end
if choix_sorts_1826 == 2 then
pUnit:RegisterEvent('spell2_1826', 1, 1)
end
end

function mob1826_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1826', math.random(1500, 3000), 1)
end

function mob1826_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1826_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1826_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1826, 1, 'mob1826_Action')
RegisterUnitEvent(1826, 2, 'mob1826_Leave')
RegisterUnitEvent(1826, 3, 'mob1826_Kill')
RegisterUnitEvent(1826, 4, 'mob1826_Die')
